home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / virus / tbav700.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1996-02-09  |  11KB  |  356 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo        --- Thunderbyte Anti-Virus installation batch program ---
  5. echo.
  6.  
  7. rem     * Make sure that we can find the utilities in the current directory
  8. if not exist TBSCAN.EXE goto error1
  9.  
  10. rem     * Find out if we are upgrading a previous version in the current dir
  11. if exist TBSTART.BAT goto pathexists
  12.  
  13. rem     * Make sure that the user specified a destination path
  14. if %1X==X goto error2
  15.  
  16. rem     * Make sure the target path exists or can be created
  17. if exist %1\nul goto pathexists
  18. md %1
  19. if not exist %1\nul goto error3
  20. :pathexists
  21.  
  22. rem     * Make sure user did not type something like 'C:' :-)
  23. if exist %1\CONFIG.SYS goto error5
  24.  
  25. echo Please read the License.Doc file. By using the TBAV package you
  26. echo agree with our license agreement. You can print the License.Doc
  27. echo file by typing the following command on the DOS command line:
  28. echo    Copy License.Doc Lpt1
  29. echo Press Ctrl-C to abort this installation batch file, or
  30. pause
  31.  
  32. echo.
  33. echo This installation batch file of the shareware version of TBAV
  34. echo is not the same as the full featured installation program of the
  35. echo commercial version of TBAV. (The main reason for the omission of
  36. echo the installation program is to save disk space and to minimize
  37. echo download time). Therefore the installation procedure might
  38. echo differ from the procedure described in the manual.
  39. echo.
  40.  
  41. rem     * If TbScanX is active, de-activate it.
  42. if not exist SCANX goto notres
  43. if exist %1\tbscanx.exe %1\tbscanx /off
  44.  
  45. :notres
  46. rem     * Copy the TBAV utilities if necessary
  47. if exist dummy.tst del dummy.tst >nul
  48. if exist %1\dummy.tst del %1\dummy.tst >nul
  49. echo TEST >%1\dummy.tst
  50. if exist dummy.tst goto filesexists
  51. if not exist %1\dummy.tst goto error4
  52. echo TbSetup will now delete the Anti-Vir.Dat file of a previous
  53. echo TBAV version if it exists in directory %1
  54. pause
  55. rem     * If Anti-Vir.Dat already exists and is hidden, delete it...
  56. tbsetup %1 remove
  57. cls
  58. echo Copying files. Please wait...
  59. copy addendum.doc %1 >nul
  60. copy agents.doc %1 >nul
  61. copy anti-vir.dat %1 >nul
  62. copy appnotes.doc %1 >nul
  63. copy file_id.diz %1 >nul
  64. copy install.bat %1 >nul
  65. copy license.doc %1 >nul
  66. copy makeresc.bat %1 >nul
  67. copy no_vsum.doc %1 >nul
  68. copy register.exe %1 >nul
  69. copy report.doc %1 >nul
  70. copy security.doc %1 >nul
  71. copy tbav.doc %1 >nul
  72. copy tbav.exe %1 >nul
  73. copy tbav.lng %1 >nul
  74. copy tbav.msg %1 >nul
  75. copy tbcheck.exe %1 >nul
  76. copy tbclean.exe %1 >nul
  77. copy tbdel.com %1 >nul
  78. copy tbdisk.exe %1 >nul
  79. copy tbdriver.exe %1 >nul
  80. copy tbdriver.lng %1 >nul
  81. copy tbfile.exe %1 >nul
  82. copy tbgensig.exe %1 >nul
  83. copy tbkey.exe %1 >nul
  84. copy tblog.exe %1 >nul
  85. copy tbmem.exe %1 >nul
  86. copy tbscan.exe %1 >nul
  87. copy tbscan.lng %1 >nul
  88. copy tbscan.sig %1 >nul
  89. copy tbscanx.exe %1 >nul
  90. copy tbsetup.dat %1 >nul
  91. copy tbsetup.exe %1 >nul
  92. copy tbutil.exe %1 >nul
  93. copy tbutil.lng %1 >nul
  94. copy veldman.pgp %1 >nul
  95. copy tbav.faq %1 >nul
  96. copy tbmon.com %1 >nul
  97. copy whatsnew.* %1 >nul
  98. if %_4ver%x==x copy descript.ion %1 >nul
  99.  
  100. :filesexists
  101. del %1\dummy.tst >nul
  102. if not exist %1\docs.exe goto nopack
  103. %1\docs -o %1
  104. del %1\docs.exe >nul
  105. :nopack
  106.  
  107. rem     * DOS has no interactive batch file commands,
  108. rem     * so we create a special program to solve that!
  109. rem     * the 'garbage' in the echo command is program code
  110. rem     * to read a key into an errorlevel, the program code
  111. rem     * will be copied into an executable file.
  112. echo ═êα╧┤L═! >%1\ask.com
  113.  
  114. echo.
  115. echo TbSetup will now generate or update the Anti-Vir.Dat file
  116. echo of the directory %1
  117. pause
  118. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  119. %1\TBSETUP %1
  120.  
  121. cls
  122. rem     * do not overwrite an existing TBAV setup.
  123. if exist %1\TBSTART.BAT goto upgrade
  124.  
  125. echo.
  126. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  127. echo directory. It is recommended to read the documentation of TBAV thoroughly
  128. echo and to make a customized setup. One of the advantages of the Thunderbyte
  129. echo Anti-Virus utilities is flexibility and the possibility to configure
  130. echo them to suit your needs in an optimal way.
  131. echo.
  132. echo This installation batch file helps you to setup the utilities in their
  133. echo most standard and non-customized way.
  134. echo Do you want to continue? (Y/n)
  135. %1\ask
  136. if not errorlevel 1 goto nosetup
  137.  
  138. rem     * make a backup of the AUTOEXEC.BAT file!
  139. echo.
  140. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  141. copy c:\autoexec.bat c:\autoexec.org >nul
  142.  
  143. rem     * create a TBSTART.BAT file in the TBAV directory.
  144. echo @echo off >%1\TBSTART.BAT
  145. echo echo off >>%1\TBSTART.BAT
  146.  
  147. echo.
  148. echo For easy access of the TBAV utilities it is recommended to put them
  149. echo into your PATH environment variable.
  150. echo Do you want to add %1 to your PATH statement? (Y/n)
  151. %1\ask
  152. if not errorlevel 1 goto dosetup
  153. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  154. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  155.  
  156. :dosetup
  157. echo.
  158. echo TbSetup will now process your drives to generate the Anti-Vir.Dat files.
  159. pause
  160. rem     * process the rest of the machine, but do not touch existing information!
  161. %1\TbSetup NewOnly AllDrives
  162.  
  163. :tbdriver
  164. cls
  165. echo.
  166. echo The TBAV package contains some utilities that can be installed in the memory
  167. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  168. %1\ask
  169. if not errorlevel 1 goto autoscan
  170. rem     * create a TBSTART.BAT file in the TBAV directory.
  171. echo %1\TbDriver >>%1\TBSTART.BAT
  172.  
  173. echo.
  174. echo TBSCANX is a memory resident virus scanner.
  175. echo Do you want to install it? (Y/n)
  176. %1\ask
  177. if not errorlevel 1 goto tbcheck
  178. rem     * add the TbScanX statement to the TBSTART.BAT file.
  179. echo %1\TbScanX EMS XMS >>%1\TBSTART.BAT
  180.  
  181. :tbcheck
  182. echo.
  183. echo TBCHECK is a memory resident integrity checker.
  184. echo Do you want to install it? (Y/n)
  185. %1\ask
  186. if not errorlevel 1 goto tbmem
  187. rem     * add the TbCheck statement to the TBSTART.BAT file.
  188. echo %1\TbCheck noavok=ab >>%1\TBSTART.BAT
  189.  
  190. :tbmem
  191. echo.
  192. echo TBMEM is a resident memory guard.
  193. echo Do you want to install it? (Y/n)
  194. %1\ask
  195. if not errorlevel 1 goto tbfile
  196. rem     * add the TbMem statement to the TBSTART.BAT file.
  197. echo %1\TbMem >>%1\TBSTART.BAT
  198.  
  199. :tbfile
  200. echo.
  201. echo TBFILE is a resident file guard.
  202. echo Do you want to install it? (Y/n)
  203. %1\ask
  204. if not errorlevel 1 goto autoscan
  205. rem     * add the TbFile statement to the TBSTART.BAT file.
  206. echo %1\TbFile >>%1\TBSTART.BAT
  207.  
  208. :autoscan
  209. echo.
  210. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  211. %1\ask
  212. if not errorlevel 1 goto addcall
  213. rem     * add the TbScan statement to the TBSTART.BAT file.
  214. echo %1\TbScan Once AllDrives >>%1\TBSTART.BAT
  215.  
  216. :addcall
  217. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  218. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  219. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  220. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  221. del C:\TEMP.BAT >nul
  222. del C:\TEMP2.BAT >nul
  223.  
  224. :ready
  225. echo.
  226. echo Do you want to scan your drives now? (Y/n)
  227. %1\ask
  228. if not errorlevel 1 goto starttbav
  229. %1\TbScan AllDrives
  230.  
  231. :starttbav
  232. cls
  233. :nosetup
  234. echo.
  235. echo It is highly recommended to print the TBAV user manual.
  236. echo You can do this with the following DOS command:
  237. echo    Copy TBAV.DOC Lpt1
  238. echo.
  239. echo If you are upgrading from previous TBAV versions, it is recommended
  240. echo to print the WHATSNEW files and the Addendum.Doc.
  241. echo You can do this with the following DOS command:
  242. echo    Copy WHATSNEW.* Lpt1
  243. echo    Copy ADDENDUM.DOC Lpt1
  244. echo.
  245. echo The menu program TBAV.EXE can be used to read the documentation files.
  246. echo Do you want to start TBAV now? (Y/n)
  247. %1\ask
  248. if not errorlevel 1 goto flush
  249. %1\TBAV
  250. goto end
  251.  
  252. :upgrade
  253. echo.
  254. if exist %1\UserSig.Dat %1\TbGenSig
  255. rem     * Delete all stuff we don't support anymore
  256. echo Install.Bat will delete some obsolete files from previous TBAV
  257. echo versions which are not supported anymore.
  258. echo.
  259. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  260. if exist %1\TbScan.Msg del %1\TbScan.Msg >nul
  261. if exist %1\VirScan.Dat del %1\VirScan.Dat >nul
  262. if exist %1\AddnSigs.Dat del %1\AddnSigs.Dat >nul
  263. if exist %1\ComprSca.* del %1\ComprSca.* >nul
  264. if exist %1\*.AVR del %1\*.AVR >nul
  265. if exist %1\MTE.Doc del %1\MTE.Doc >nul
  266. if exist %1\Washburn.Doc del %1\Washburn.Doc >nul
  267. if exist %1\TbScanX.Com del %1\TbScanX.Com >nul
  268. if exist %1\TbRescue.* del %1\TbRescue.* >nul
  269. if exist %1\TBAV.CFG del %1\TBAV.CFG >nul
  270. if exist %1\TbShell.* del %1\TbShell.* >nul
  271. if exist %1\register.exe ren %1\register.exe reg.exe >nul
  272. if exist %1\register.txt ren %1\register.txt reg.txt >nul
  273. if exist %1\register.* del %1\register.* >nul
  274. if exist %1\reg.exe ren %1\reg.exe register.exe >nul
  275. if exist %1\reg.txt ren %1\reg.txt register.txt >nul
  276. if exist %1\TbGarble.* del %1\TbGarble.* >nul
  277. if exist %1\GetBoot.* del %1\GetBoot.* >nul
  278. if exist %1\Intro.Doc del %1\Intro.Doc >nul
  279. if exist %1\TbSetup.Doc del %1\TbSetup.Doc >nul
  280. if exist %1\TbUtil.Doc del %1\TbUtil.Doc >nul
  281. if exist %1\TbScan.Doc del %1\TbScan.Doc >nul
  282. if exist %1\TbClean.Doc del %1\TbClean.Doc >nul
  283. if exist %1\StackMan.Doc del %1\StackMan.Doc >nul
  284. if exist %1\TbGensig.Doc del %1\TbGensig.Doc >nul
  285. if exist %1\TbDriver.Doc del %1\TbDriver.Doc >nul
  286. if exist %1\TbScanX.Doc del %1\TbScanX.Doc >nul
  287. if exist %1\TbCheck.Doc del %1\TbCheck.Doc >nul
  288. if exist %1\TbMem.Doc del %1\TbMem.Doc >nul
  289. if exist %1\TbFile.Doc del %1\TbFile.Doc >nul
  290. if exist %1\TbDisk.Doc del %1\TbDisk.Doc >nul
  291. if exist %1\TbDel.Doc del %1\TbDel.Doc >nul
  292. if exist %1\Upgrade.Bat del %1\Upgrade.Bat >nul
  293. if exist %1\TBAV.ICO del %1\TBAV.ICO >nul
  294. if exist %1\TBAV.PIF del %1\TBAV.PIF >nul
  295. echo All obsolete TBAV files have been removed.
  296. echo.
  297. if not exist %1\StackMan.Exe goto ready
  298. echo Note: StackMan.Exe is not necessary anymore to solve TBAV problems.
  299. echo StackMan is therefor no longer supplied with the shareware TBAV package.
  300. echo If you do not use StackMan, you can delete it from the TBAV directory.
  301. goto ready
  302.  
  303. :error1
  304. echo Error: Invalid program invocation!
  305. echo.
  306. echo Make sure that you invoke INSTALL.BAT in the directory where the
  307. echo TBAV utilities can be found!
  308. echo.
  309. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  310. echo A: [enter]
  311. echo INSTALL [path] [enter]
  312. goto end
  313.  
  314. :error2
  315. echo Error: No destination path specified!
  316. echo.
  317. echo You have to specify the destination path for the TBAV utilities!
  318. echo Even if the utilities are already in the destination path.
  319. echo.
  320. echo Example:
  321. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  322. echo INSTALL C:\TBAV
  323. goto end
  324.  
  325. :error3
  326. echo Error: Unable to creat destination directory %1
  327. echo.
  328. echo Make sure you enter an existing destination path or a path that can be created!
  329. goto end
  330.  
  331. :error4
  332. echo Error: Unable to copy files in directory %1
  333. echo.
  334. echo Disk full? Access denied?
  335. goto end
  336.  
  337. :error5
  338. echo Error: No target directory specified!
  339. echo.
  340. echo Make sure you enter a full destination path!
  341. echo %1 is not sufficient!
  342. echo.
  343. echo Example:
  344. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  345. echo INSTALL C:\TBAV
  346. goto end
  347.  
  348. :flush
  349. echo.
  350. echo If you have a disk cache installed, wait a few seconds to allow the
  351. echo cache to flush the buffers, and reboot...
  352.  
  353. :end
  354. if exist %1\ask.com del %1\ask.com >nul
  355.  
  356.